<script type="text/javascript">
function change_pic(pic_path, pic) {
    $('#delete_pic_filename').val(pic);
	document.bild.src = pic_path + pic;
}
</script>
<{if $isset_album}>
	<{if !$error}>
		<div style="float:left;width:<{if $AUTHENTICATED}>250<{else}>410<{/if}>px;height:25px;font-weight:bold;" id="album_name">
			<span><{if $AUTHENTICATED}><{$album_name|truncate:20:"..."}><{else}><{$album_name}><{/if}></span><{if $AUTHENTICATED}>&nbsp;<a class="link" href="#" onclick="return editAlbumName(true, '<{$album_name}>', '<{$album_folder}>');"><img src="images/admin_edit.gif" border="0" /></a><{/if}>
		</div>
		<{if $AUTHENTICATED}>
			<div style="display:none;float:left;width:250px;height:25px;" id="album_name_edit">
				<form method="post" action="<{$HOME_URL}>index.php?site=galerie&action=updateAlbumName&album=<{$album_folder}>&redirect_url=<{$redirect_url}>">
					<input type="text" name="albumNameEditForm" id="albumNameEditForm" value="<{$album_name}>" style="font-size:7pt;" size="20" />&nbsp;<input type="submit" id="button_ok_edit" style="font-size:7pt;" value="OK" />&nbsp;<input type="button" id="button_cancel_edit" style="font-size:7pt;" value="Abbr." onclick="editAlbumName(false, '<{$album_name}>');" />
				</form>
			</div>
			<div style="float:left;width:160px;height:25px;" id="new_pic">
				<span style="<{if !$AUTHENTICATED}>display:none;<{/if}>cursor:pointer;" onclick="uploadPicture(true);" onmouseover="this.style.color='#ffb709';" onmouseout="this.style.color='';">[Neues Foto hochladen]</span>
			</div>
		<{/if}>
		<div style="float:left;width:160px;height:25px;text-align:right;" id="back_to_index">
			<a href="<{$HOME_URL}>index.php?site=galerie" class="link">zur&uuml;ck zur &Uuml;bersicht</a>
		</div>
		<{if $AUTHENTICATED}>
			<div style="display:none;float:left;width:190px;height:25px;text-align:right;" id="fotoupload">
				<form method="post" enctype="multipart/form-data" action="<{$HOME_URL}>index.php?site=galerie&action=fileupload&redirect_url=<{$redirect_url}>&album=<{$album_folder}>" onsubmit="submit();$('#button_ok').val('Bild wird hochgeladen...');document.getElementById('button_ok').disabled=true;document.getElementById('button_cancel').style.display='none';">
					<input type="file" name="bild" style="font-size:7pt;" size="20" />&nbsp;<input type="submit" id="button_ok" style="font-size:7pt;" value="OK" /><input type="button" value="Abbr." id="button_cancel" style="margin-left:4px; font-size:7pt;" onclick="uploadPicture(false);" />
				</form>
			</div>
		<{/if}>
		<{include file="galerie/album_thumbnails.tpl"}>
		<{include file="galerie/album_picture.tpl"}>
	<{else}>
		<div style="width:550px;overflow:auto;">
			<div align="center" style="float:left;padding:0px 0px 30px 0px;margin:2px;width:98%;">
				Beim Aufruf des Albums ist ein Fehler aufgetreten.
			</div>
		</div>
	<{/if}>
<{else}>
	<div style="width:550px;overflow:auto;">
		<div align="center" style="float:left;padding:0px 0px 30px 0px;margin:2px;width:98%;">
			Dieses Album existiert nicht.
		</div>
	</div>
<{/if}>